import request from '../utils/request'

export function list(params) {
    return request({
        url: '/admin/shipping/list',
        method: 'get',
        params: params
    })
}

export function find(id) {
    return request({
        url: '/admin/shipping/find/' + id,
        method: 'get'
    })
}


export function dispatch(id, params) {
    return request({
        url: '/admin/shipping/dispatch/' + id,
        method: 'post',
        params: params
    })
}


export function shipping(id,params, data) {
    return request({
        url: '/admin/shipping/shipping/' + id,
        method: 'post',
		params:params,
        data: data
    })
}


export function reject(id) {
    return request({
        url: '/admin/shipping/reject/' + id,
        method: 'post'
    })
}


export function received(id) {
    return request({
        url: '/admin/shipping/received/' + id,
        method: 'post'
    })
}


export function complete(id, data) {
    return request({
        url: '/admin/shipping/complete/' + id,
        method: 'post',
        data: data
    })
}

export function updateTrackingNo(id, data) {
    return request({
        url: '/admin/shipping/updateTrackingNo/' + id,
        method: 'post',
        data: data
    })
}


export function summary() {
    return request({
        url: '/admin/shipping/summary',
        method: 'post',
    })
}


export function cancel(id) {
    return request({
        url: '/admin/shipping/cancel/' + id,
        method: 'post'
    })
}
